<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" xmlns="http://www.w3.org/1999/html" lang="en">
<head>
    <meta charset="UTF-8"/>
    <link rel="stylesheet" th:href="@{/style.css}"/>
    <title>Contacts</title>
</head>
<body>
<h2>Spring Boot Contacts</h2>
<form method="POST">
    <label for="firstName">first Name:</label>
        <input type="text" name="firstName"></input><br/>
    <label for="lastName">last Name:</label>
        <input type="text" name="lastName"></input><br/>
    <label for="phoneNumber">Phone #:</label>
        <input type="text" name="phoneNumber"></input><br/>
    <label for="emailAddress">Email:</label>
        <input type="text" name="emailAddress"></input><br/>
        <input type="submit"></input>
</form>

<hr/>
<ul th:each="contact : ${contacts}">
    <li>
        <span th:text="${contact.firstName}">First</span>
        <span th:text="${contact.lastName}">Last</span>:
        <span th:text="${contact.phoneNumber}">PhoneNumber</span>,
        <span th:text="${contact.emailAddress}">emailAddress</span>
    </li>
</ul>


</body>
</html>